#include <iostream>
#include <string>

using namespace std;


extern void PointerTesst();
extern void CharsStringTest();
extern void VectorTest();
extern void StringTest();
extern void ConstArrayTest();
extern void MultiDimArray();
extern void functionParameters();
extern void FunctionPointerTest();


//void test(const int * const ip){
//	cout << "Before:" << *ip << endl;
//	int *ii = ip;
//	*ip = *ip + 1;
//	*ip ++;
//	cout << "After:" << *ip << endl;
//}

int ii = 42;
#include <bitset>
int main(){

	string strval("1100");
	bitset<32> bitvec(strval);


	int ii = 100;
	int jj = ii;
	const int &rr = ii + 1;
	int &r = jj;
	
	// cout << "Main" << endl;

	// PointerTesst();
	// CharsStringTest();
	
	string s;
	char *ch = "";
	s = ch;
	string::size_type size = s.size();
	string s1 = "asd" + s + "is ok?";

	const double m = 9.0;
	const double n = 1.0;
	double o = 5.0;
	double const* ptr = &o;
	ptr = &n;

	int i = 2;
	// test(&i);
	cout << i << endl;

	int * const p = 0;

	const int *pic ;
	int * const cpi = 0;
	const int * const cpic = 0;

	int refi = 1;
	int &ref = refi;
	cout << "ref: " << ref << ", &ref: " << &ref << endl;

	int *iptr = &i;
	int *&refPtr = iptr;

	const double dval = 1024;	
	const int &cri = dval;

	const int ivla = 1;
	const int *const &pi_ref = &ivla;

	// VectorTest();

	// StringTest();

	// ConstArrayTest();

	// MultiDimArray();

	// functionParameters();

	FunctionPointerTest();

	/*getchar();*/
}

